<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: cwh
 * @LastEditTime: 2022-01-08 17:44:47
-->
<template>
  <div  ref="bottom3_container" style="height:95%"></div>
</template>
<script>
import {  Radar } from '@antv/g2plot'
export default {
  data(){
    return{
      dataArr:[
         { name: '一氧化碳', star: 0.002 },
         { name: '二氧化硫', star: 0.04},
         { name: '二氧化氮', star: 0.001 },
         { name: 'PM2.5', star:  0.005},
         { name: '氧气', star: 21 },
         { name: '氢气', star:  10.5},
         { name: '氦气', star: 78 },
      ]
    }
  },
  mounted() {
    this.initChart()
  },
  methods:{
    initChart(){
      const  radar = new  Radar(this.$refs.bottom3_container,{
            data:this.dataArr,
            xField: 'name',
            yField: 'star',
            meta: {
              star: {
                 min: 0,
                nice: true,
                    },
                  },
            area: {},
              })
      radar.render()
    }
  }
}

</script>